
$(document).ready(function(){
    $(this).find('.currency').each(function(){
        check_currency(this); 
    })
    $('.currency').blur(function(){
        check_currency(this);
    });
});

function check_currency(focus){
    id = $(focus).attr('id');
    val = $(focus).val();
    focus = unformatNumber(val,num_grp_sep, dec_sep);;
    if(focus>0){
        focus = formatNumber(focus,num_grp_sep, dec_sep);
        $('#'+id).val(focus);  
    }else{
        $('#'+id).val('');
    }  
}

/**
* Thanh le:
*/

function underline(deal){
    $(deal).css('text-decoration','underline'); 
}
function non_underline(deal){
    $(deal).css('text-decoration','none'); 
}